/****************************************************
    Author:            龙之介
    CreatTime:    #CreatTime#
    Description:     Nothing
*****************************************************/

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using UnityEngine.UI;
using ZYKTool;
using System.Linq;



namespace LongZhiJie
{
    public class Gun2 : Gun基本属性
    {
        #region 常量
        #endregion

        #region 事件
        #endregion

        #region 字段
        #endregion


        #region 属性 
        #endregion


        #region 方法 
        #endregion

        #region Unity回调
        #endregion

        #region 事件回调
        #endregion

        #region 帮助方法
        #endregion
        public override void Attack()
        {
            ZYKTool.Timer.ZYKTimerSystemTool.Instance.ZYKTimerAddTimerTask(
   () =>
   {
       GameObject go = Instantiate(_projectile, _shotPoint.position, _shotPoint.rotation);
       //Instantiate(_projectile, _shotPoint.position, _shotPoint.rotation);
       Projectile bullet = go.GetOrAddComponent<Projectile>();
       bullet.damage = Damage;
       bullet.speed = 150;
       bullet.lifeTime = 2;

   }, 0.2f, Count);
            //Debug.LogError("attack" + 2);
            // Instantiate(_shotEffect, _shotPoint.position, Quaternion.identity);
        
        }

        public override void Init(GameObject projectile, GameObject shotEffect, Transform shotPoint)
        {
            base.Init(projectile, shotEffect, shotPoint);
        }
    }
}